<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt" %>
<% 
response.setHeader("Pragma","No-cache"); 
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0); 
%> 
	<c:forEach var="t" items="${sysList}" varStatus="status">
		<li class="layui-nav-item layui-nav-itemed">
		    <a href="javascript:;" style="padding-left: 35px;">
		    	<span title="资源名称：${t.name}" class="text-overflow" style="width:160px;">${t.ordernum}--<i class="layui-icon" >${t.icon}</i>&nbsp${t.name}</span>
		    	<span  style="position: absolute ;top:0px;left:490px;">
   					<c:if test="${t.ishide==0}">显示</c:if>
   					<c:if test="${t.ishide==1}">隐藏</c:if>
   				</span>
		    	<span title="reskey：${t.reskey}" class="text-overflow"  style="width:100px;position: absolute ;top:0px;left:540px;">${t.reskey}</span>
		    	<span title="描述：${t.description}" class="text-overflow"  style="width:160px;position: absolute ;top:0px;left:655px;">${t.description}</span>
		    </a>
		    <div style="position: absolute ;top:0px;left:10px;">
		    	<input class="parentId${t.parentid} id${t.id}" parentId="${t.parentid}" type="checkbox" name="idCheckbox" value="${t.id}" lay-skin="primary"  lay-filter="allChoose">
		    </div>
		    <div style="width: 269px;position: absolute ;top:0px;left:200px;line-height: 47px;">
			    <div class="layui-btn-group">
				    <button class="layui-btn layui-btn-small" onclick="sysresourcesSort(${t.id},${t.parentid},'up')">上</button>
				    <button class="layui-btn layui-btn-small" onclick="sysresourcesSort(${t.id},${t.parentid},'down')">下</button>
			    </div>
			    <div class="layui-btn-group">
				    <button class="layui-btn layui-btn-small" onclick="sysresourcesUpdatePage(${t.id})">编辑</button>
				    <c:if test="${t.ishide==1}">
					    <button onclick="sysresourcesUpadateishide(${t.id},0);" class="layui-btn layui-btn-normal layui-btn-small">显示</button>
				  	</c:if>
				  	<c:if test="${t.ishide==0}">
					    <button onclick="sysresourcesUpadateishide(${t.id},1);" class="layui-btn layui-btn-warm layui-btn-small">隐藏</button>
				  	</c:if>
				    <button onclick="sysresourcesDelete(${t.id},'${t.name}','${t.description}')" class="layui-btn layui-btn-danger layui-btn-small">删除</button>
				    <button class="layui-btn layui-btn-small" onclick="addsysresourcesPage(${t.id},2)">新增</button>
			    </div>
		    </div>
		    <c:if test="${t.nodes!=null}">
			    <dl class="layui-nav-child">
			    	<c:forEach var="t1" items="${t.nodes}" varStatus="status">
				      <dd>
				      	<a href="javascript:;" style="padding-left: 55px;">
					      	<span title="资源名称：${t1.name}" class="text-overflow" style="width:140px;">${t1.ordernum}--<i class="layui-icon" >${t1.icon}</i>&nbsp${t1.name}</span>
		    				<span  style="position: absolute ;top:0px;left:490px;">
		    					<c:if test="${t.ishide==0&&t1.ishide==0}">显示</c:if>
		    					<c:if test="${t.ishide==0&&t1.ishide==1}">隐藏</c:if>
		    				</span>
		    				<span title="reskey：${t1.reskey}" class="text-overflow"  style="width:100px;position: absolute ;top:0px;left:540px;">${t1.reskey}</span>
		    				<span title="描述：${t1.description}" class="text-overflow" style="width:160px;position: absolute ;top:0px;left:655px;">${t1.description}</span>
				      	</a>
				      	<div style="position: absolute ;top:0px;left:30px;">
					    	<input class="parentId${t1.parentid} id${t1.id}" parentId="${t1.parentid}" type="checkbox" name="idCheckbox" value="${t1.id}" lay-skin="primary"  lay-filter="allChoose">
					    </div>
					    <div style="width: 224px;position: absolute ;top:0px;left:200px;line-height: 46px;">
						    <div class="layui-btn-group">
							    <button class="layui-btn layui-btn-small" onclick="sysresourcesSort(${t1.id},${t1.parentid},'up')">上</button>
				    			<button class="layui-btn layui-btn-small" onclick="sysresourcesSort(${t1.id},${t1.parentid},'down')">下</button>
						    </div>
						    
					      	<div class="layui-btn-group" >
							    <button class="layui-btn layui-btn-small" onclick="sysresourcesUpdatePage(${t1.id})">编辑</button>
							    <c:if test="${t.ishide==0&&t1.ishide==1}">
								    <button onclick="sysresourcesUpadateishide(${t1.id},0);" class="layui-btn layui-btn-normal layui-btn-small">显示</button>
							  	</c:if>
							  	<c:if test="${t.ishide==0&&t1.ishide==0}">
								    <button onclick="sysresourcesUpadateishide(${t1.id},1);" class="layui-btn layui-btn-warm layui-btn-small">隐藏</button>
							  	</c:if>
							    <button onclick="sysresourcesDelete(${t1.id},'${t1.name}','${t1.description}')" class="layui-btn layui-btn-danger layui-btn-small">删除</button>
						    </div>
					    </div>
				      </dd>
			    	</c:forEach>
			    </dl>
		    </c:if>
		</li>
	</c:forEach>
<script src="${pageContext.request.contextPath}/static/js/back/sysresources/sysresourcesPageList.js"></script>
